package com.alameda.common.base.constant;

/**
 * sql DML语句常量
 *
 * @author Lv
 * @date 2024/11/24
 */
public class SqlDmlConstant {
    /**
     * 读取 AD_MEDIA 删除数据 DML
     */
    public static final String SELECT_AD_MEDIA_DELETED = "select id, file_url, file_name, file_cover, create_id, create_time, update_id, update_time, delete_flag, ext_data from ad_media where delete_flag = 1";

    /**
     * 物理删除 AD_MEDIA 指定数据 DML
     */
    public static final String DELETE_AD_MEDIA = "delete from ad_media where id in ";

    /**
     * 物理删除 AD_TAG_MIDDLE 指定数据 DML
     */
    public static final String DELETE_AD_TAG_MIDDLE = "delete from ad_tag_middle where delete_flag =1 and media_id in ";

    /**
     * 物理删除 DELETE_AP_VIDEO_DANMAKU 已删除超过七天的数据
     */
    public static final String DELETE_AP_VIDEO_DANMAKU = "DELETE FROM  ap_video_danmaku WHERE delete_flag = 1 and create_time <= (CURDATE() - INTERVAL 7 DAY)";

    /**
     * 左括号
     */
    public static final String LEFT_BRACKET = "( ";

    /**
     * 右括号
     */
    public static final String RIGHT_BRACKET = " )";

    /**
     * DML 语句 limit 1
     */
    public static final String LIMIT_1 = "limit 1";

    /**
     * limit 关键字
     */
    public static final String LIMIT = "limit ";

    /**
     * 字段 id
     */
    public static final String ID = "id";

    /**
     * 字段 create_time
     */
    public static final String CREATE_TIME = "create_time";
}
